home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13147 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  51 lines

  1. Path: sun001.spd.dsccc.com!jmccarty
  2. From: jmccarty@sun1307.spd.dsccc.com (Mike McCarty)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: beginner question
  5. Date: 4 Apr 1996 22:40:07 GMT
  6. Organization: DSC Communications Corporation
  7. Message-ID: <4k1j47$iab@sun001.spd.dsccc.com>
  8. References: <4jc3sr$1ggu@uvaix3e1.comp.UVic.CA> <315AFED2.7466@willows.com> <315F525A.4A1CD496@alcyone.com> <31625C30.12AA@sooner.net>
  9. NNTP-Posting-Host: sun1307.spd.dsccc.com
  10.  
  11. In article <31625C30.12AA@sooner.net>, Eddie Bush  <edwbush@sooner.net> wrote:
  12. )Erik Max Francis wrote:
  13. )> 
  14. )> Tarang Deshpande wrote:
  15. )> 
  16. )> > So then what does the following mean:
  17. )> >
  18. )> > struct _FOO
  19. )> > {
  20. )> >         int     bar;
  21. )> > } FOO;
  22.  
  23. This declares a VARIABLE named FOO of type struct _FOO.
  24.  
  25. )> >
  26. )> > struct _FOO s1;
  27. )> > FOO         s2;
  28.  
  29. This is a SYNTAX ERROR.
  30.  
  31. )The initial declaration of the structure doesn't make available FOO for manipulation.  FOO is a 
  32. )type.  ...isn't it?  I always understood that 'struct _FOO' is the 'tag name' (the name of the 
  33.  
  34. No, it is a variable.
  35.  
  36. [rest gone]
  37.  
  38. The code presented above is equivalent to
  39.  
  40.     int    fred;
  41.  
  42.     fred    barney;
  43.  
  44. Mike
  45.  
  46. -- 
  47. ----
  48. char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
  49.  
  50. I don't speak for DSC.         <- They make me say that.
  51.